<template>
    <div class="Book">
        <ul>
            <li>书名是{{ bookname }},作者是{{ author }}</li>
            <button @click="is">书名</button>
        </ul>
    </div>
    
</template>
<script>
export default {
    name:"Book",
    //父组件通过属性传值
    props:["bookname","author"],
    data:function(){
        return{

            
        }
    },
    methods:{
        is(){
            alert(this.bookname)
        }
    }
}
</script>